<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="../template.xhtml">

	<ui:define name="titre">Page de connexion</ui:define>

	<ui:define name="contenu">
		<h:form>

			<p:growl id="growl" />

			<p:panel id="pnl" header="Se Connecter" style="margin-bottom:10px; width:40%;">
				<p:messages id="messages" />
				
				<h:panelGrid columns="3">
					<h:outputLabel for="email" value="Email: *" />
					<p:inputText id="email" value="#{loginBean.email}"
						required="true" label="Email">
						<f:validateLength minimum="8" />
					</p:inputText>
					<p:message for="email" />

					<h:outputLabel for="password" value="Mot de Passe: *" />
					<p:password id="password" value="#{loginBean.motDePasse}"  
            				label="Mot de Passe" required="true"/>
					<p:message for="password" />
				</h:panelGrid>
				
				<br/>
				
				<center>
					<p:commandButton id="saveBtn" value="Se connecter" icon="ui-icon-check"
						style="margin:0" actionListener="#{loginBean.seConnecter}"
						update="messages" />
				</center>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>